package com.ztmao.shortlink.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ztmao.shortlink.admin.convention.result.Result;
import com.ztmao.shortlink.admin.dao.entity.UserDO;
import com.ztmao.shortlink.admin.dto.req.UserLoginReqDTO;
import com.ztmao.shortlink.admin.dto.req.UserRegisterReqDTO;
import com.ztmao.shortlink.admin.dto.req.UserUpdateReqDTO;
import com.ztmao.shortlink.admin.dto.resp.UserLoginRespDTO;

/**
 * 用户接口层
 */
public interface UserService extends IService<UserDO> {
    Result getUserByUserName(String username);

    Boolean hasUserName(String username);

    Result<Void> register(UserRegisterReqDTO userRegisterReqDTO);

    void update(UserUpdateReqDTO requestParam);

    UserLoginRespDTO login(UserLoginReqDTO requestParam);

    Boolean checkLogin(String username, String token);

    void logout(String username, String token);
}
